import java.util.*;

/**
 * @author LKQ
 * @date 2022/6/15 9:35
 * @description
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            // 加密字符串
            String encrypt = sc.nextLine();
            // 解密字符串
            String decrypt = sc.nextLine();
            System.out.println(enc(encrypt));
            System.out.println(dec(decrypt));
        }
        sc.close();
    }
    public static String enc(String encrypt) {
        StringBuilder sb = new StringBuilder();
        for (char c: encrypt.toCharArray()) {
            if (Character.isDigit(c)) {
                // 注意这里要 -‘0’
                sb.append((c -'0' + 1) % 10);
            }else if (Character.isLetter(c)){
                char next = 'a';
                if (Character.isUpperCase(c)) {
                    next = (char) ((c - 'A' + 1) % 26 + 'a');
                }else {
                    next = (char) ((c - 'a' + 1) % 26 + 'A');
                }
                sb.append(next);
            }else {
                sb.append(c);
            }
        }
        return sb.toString();
    }
    public static String dec(String decrypt) {
        StringBuilder sb = new StringBuilder();
        for (char c: decrypt.toCharArray()) {
            if (Character.isDigit(c)) {
                sb.append((c - '0' + 9) % 10);
            }else if (Character.isLetter(c)) {
                char prev = 'a';
                if (Character.isUpperCase(c)) {
                    prev = (char) ((c - 'A' + 25) % 26 + 'a');
                }else {
                    prev = (char) ((c - 'a' + 25) % 26 + 'A');
                }
                sb.append(prev);
            }else {
                sb.append(c);
            }
        }
        return sb.toString();
    }
}
